// 页面请求模块
import req from '@/utils/request';
import * as URL from '@/constants/api';

export function getPlayList() {
    // 返回Promise实例 给数据维护模块直接使用
    return req({
        url: URL.PLAY_LIST,
        params: {
            limit: 6,
        },
    }).then(res => res.data.playlists);
};
export function getNewSongList() {
    return req({
        url: URL.NEW_SONG_LIST,
    })
    .then(res => res.data.result);
};
export function getSongListInformation(id) {
    return req({
        url: URL.HOT_SONG_LIST,
        params: {
            id,
        }
    }).then(res => res.data);
};
export function getCommentList(id) {
    return req({
        url: URL.COMMENT_LIST,
        params: {
            id,
        }
    }).then(res => res.data.comments);
}